﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Iacym.Entities;
using Iacym.Repository;

namespace Iacym.Repository
{
    public class Persona_IdiomaRepository:MasterRepository,IPersona_IdiomaRepository
    {
        public List<PERSONA_IDIOMAS> GetAllFromPersonaIdiomas()
        {
            var query = from c in context.PERSONA_IDIOMAS
                        select c;
            return query.ToList();
        }

        public List<PERSONA_IDIOMAS> GetFromPersonaIdiomasByPersona(int id)
        {
            var query = from c in context.PERSONA_IDIOMAS
                        where c.PersonaId.Equals(id)
                        select c;
            return query.ToList();
        }
    }
}
